package com.firefighting.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.firefighting.entity.MaintenanceplanContent;

public interface MaintenanceplanContentMapper {
    int insert(MaintenanceplanContent record);

    int insertSelective(MaintenanceplanContent record);
    
    //Liuxc 根据Plan id删除关系
	void deleteByPlanId(List<Integer> planIdList);
	
	//Hanjd 根据Plan id 和 content id修改下发状态
	void updateByPlanIdContentId(MaintenanceplanContent maintenanceplanContent);
	//Hanjd 根据Plan id 和 content id查询
		MaintenanceplanContent selectByPlanIdContentId(@Param("maintenanceplanId") Integer planId,@Param("maintenanceContentId")Integer contentId,@Param("buildingId")Integer buildingId);
		
	/** zhyan 根据计划id和内容id查询完成状态   */
	List<String> selectFinishedStateByPlanIdAndContentIdList(@Param("maintenancePlanId") int maintenancePlanId, @Param("list") List<Integer> list);
	
	/** zhyan 根据计划id和内容id更新完成状态  */
	int updateFinishedStateByPlanIdAndContentIdList(@Param("stateFinished") String stateFinished, @Param("maintennacePlanId") int maintenancePlanId, @Param("list") List<Integer> list);
}